﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

public partial class NivelDeFormacion : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["CadenaDeConexion"] = ConfigurationManager.ConnectionStrings["RFID"].ConnectionString;
    }
    protected void InsertCancelButton_Click(object sender, EventArgs e)
    {
        limpiarformulario();
    }
    protected void LinkButtonAddNew_Click(object sender, EventArgs e)
    {
        FormViewNivelDeFormacion.ChangeMode(FormViewMode.Insert);
    }
    private void limpiarformulario()
    {
        FormViewNivelDeFormacion.Controls.Clear();
        FormViewNivelDeFormacion.ChangeMode(FormViewMode.ReadOnly);
    }
    protected void FormViewNivelDeFormacion_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        limpiarformulario();
    }
    protected void ObjectDataSourceNivelDeFormacion_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
    {
        
    }
    protected void ObjectDataSourceNivelDeFormacion_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
    {
        Label1.Text = e.OutputParameters["mensaje"].ToString();
    }
}
